package com.jt9003.utils;

import java.io.FileWriter;
import java.io.IOException;

public class AlipayConfig {

//↓↓↓↓↓↓↓↓↓↓请在这里配置您的基本信息↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓ 账号：devcny0992@sandbox.com 登录密码/支付密码：111111

       // 应用ID,您的APPID，收款账号既是您的APPID对应支付宝账号
       public static String app_id = "2016102000727321";

       // 商户私钥，您的PKCS8格式RSA2私钥
       public static String merchant_private_key = "MIIEvgIBADANBgkqhkiG9w0BAQEFAASCBKgwggSkAgEAAoIBAQCpJxAOjKTJS4MgCtptbvTv0BkZnOeafw5L0QrE7aawU0bGkyUJdFw31JaFE/F8hXDGUXqe+kqpuZHP58L7gZV8QZJKLg4j1U45guoATlyBe1eaQGIUHYMrKux1X42Qp1jBAO7NFxvovInbhpGHcv/6F8J51dzsfFd2rQ2d7pdfzRGUAmuoOHrc4bs03Ck95pUhXWlXgDGFVncv9vPTAvVI1NbUG873aTMaUSAm2xbHcvsTd50tdWUdWlcqmZ5TuQAMcq5TKgNjGLRphG3JhHK2qsJQBS7RpsfHCTIqLBmoJRg1vc1TCGcpI+VLcNTEc8OcO4b6gpMgcC57JJHB1HSNAgMBAAECggEAR6BB3VdSw+YUzTGrUmGEmDOvHThinfolLJeFDuRvDAUHWDigm0NJdV6wqgNK42aB3YhM+xqTGRF6G+ZQmz1A9k+xyXV9CVFegV3dBmooI6/95VRT856Xl2TiocTnZhRmsbtaYz/g0olberid0RQyLk13TS3xEbaJNriKppCMSsURqHzvRHfAqVL9g9gVgIyBc+Vn3cEfcsY9ZusxK9e6243mMTRey9cfneR6kI5Wp38xYWB3QlE0gp+AEnt2IgtwQNGUIvjqkUS+27sPhazqtspyh6lToebVLjZWZK1qziRgVjbPn2fRuCiZAnKbHUc+CJwFLgTGoDA5NE4KvfUnRQKBgQD0N74N5G+RGq6ZAWMIov0VqaMSYQcc6AXjR0Q8SuZOZM3YiSRgjavhwjZ8xzDz/+qeWi0qNjBc/gaFXybflnFrtuw+nf7xixdLllEGfUZUMs2pyDOghw3oQFj82Yv5mj5+VWti85mv4p2fq/y6jpgq3CbVgdJC2iwRrmOwjgO2MwKBgQCxUDbAqUD7ro3OejtV+Xn1sLFib+Qf0t4+KYG5AeGknmjHj4Ly1Z28mhIEldWEwi8C0mu8YS0mayMyqlziuJQwfZ46TxXIa9AlulvhR/CW8IWtgvVYf7puu6JpVX97q7f0onCjRRm+iSJwSZ6T7Lg1BXhQl1ylprRZIDC4zCDqPwKBgQCV0vTH9RL1BFeFCrLFA6kcdxvSFLCWbUnfa0NTcefkxDb81vX4PjHqqIlg95rytlgrmcsHkIMPKdC6Veu1U8h1ep1otOlJKjm6Z5eB0a0pzpkZxfbWTsSbbY6qYJRdJuGcA6+D30qz+uUUpiDAGucDtFgmuCRUWyCaIFCMajOgvQKBgQCRXnQlLB5MuWUlXOz8pZYpqf0j+RwMQzNVv23NIg++iOjag3wWXq/9iksvWzA8sX8dTypovTro/nlS9n1Em5NS1go9P81aDZoO9GSTpAlJllPiVzWSotVUJ50VwrTLzZL5i5vRH7vljEShzpmmKTM0tRFY8V9RqAS/9TY8q45ovQKBgFQU1iHgAWON3XzSpXzwm0+/oJMzn0xubWy1fN+5njKThuB3D2ur0QUCmbGUWXlTiTIJdFKjqgJ+SK8yxK88B8AdIc7t0Y5xHv/LK8R14pcjruFSFB3kdOsd0prt8Q89TlTe8x4sX531/3zWIoii5L+1IABL89gmCC6qFysltbMH";

       // 支付宝公钥,查看地址：https://openhome.alipay.com/platform/keyManage.htm 对应APPID下的支付宝公钥。
       public static String alipay_public_key = "MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAqScQDoykyUuDIArabW7079AZGZznmn8OS9EKxO2msFNGxpMlCXRcN9SWhRPxfIVwxlF6nvpKqbmRz+fC+4GVfEGSSi4OI9VOOYLqAE5cgXtXmkBiFB2DKyrsdV+NkKdYwQDuzRcb6LyJ24aRh3L/+hfCedXc7HxXdq0Nne6XX80RlAJrqDh63OG7NNwpPeaVIV1pV4AxhVZ3L/bz0wL1SNTW1BvO92kzGlEgJtsWx3L7E3edLXVlHVpXKpmeU7kADHKuUyoDYxi0aYRtyYRytqrCUAUu0abHxwkyKiwZqCUYNb3NUwhnKSPlS3DUxHPDnDuG+oKTIHAueySRwdR0jQIDAQAB";

       // 服务器异步通知页面路径  需http://格式的完整路径，不能加?id=123这类自定义参数，必须外网可以正常访问
       public static String notify_url ="http://122.51.140.205:8892/JT90/index.html";

       // 页面跳转同步通知页面路径 需http://格式的完整路径，不能加?id=123这类自定义参数，必须外网可以正常访问
       public static String return_url = "http://122.51.140.205:8892/JT90/index.html";

       // 签名方式
       public static String sign_type = "RSA2";

       // 字符编码格式
       public static String charset = "utf-8";

       // 支付宝网关
       public static String gatewayUrl = "https://openapi.alipaydev.com/gateway.do";

       // 支付宝网关
       public static String log_path = "C:\\";


//↑↑↑↑↑↑↑↑↑↑请在这里配置您的基本信息↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑

       /**
        * 写日志，方便测试（看网站需求，也可以改成把记录存入数据库）
        * @param sWord 要写入日志里的文本内容
        */
       public static void logResult(String sWord) {
           FileWriter writer = null;
           try {
               writer = new FileWriter(log_path + "alipay_log_" + System.currentTimeMillis()+".txt");
               writer.write(sWord);
           } catch (Exception e) {
               e.printStackTrace();
           } finally {
               if (writer != null) {
                   try {
                       writer.close();
                   } catch (IOException e) {
                       e.printStackTrace();
                   }
               }
           }
       }


}
